package tests;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import urbanparks.ParkManager;

/**
 * Tests for the ParkManager class.
 * 
 * @author Dallas Rosson
 * @version 1.1 2/29/2012
 */
public class ParkManagerTest {

  /**
   * Tests whether a Park Manger is created properly.
   */
  @Test
  public void testParkManagerCreation() {
    
    ParkManager manager = new ParkManager("Frank", "Castle", 
                                          "FrankCastle@beatudown.org", 
                                           2, "555-555-1234");
    
    assertEquals("First name incorrect!", "Frank", manager.getFirstName());
    assertEquals("Last name incorrect!", "Castle", manager.getLastName());
    assertEquals("Email incorrect!", "FrankCastle@beatudown.org", manager.getEmailAddress());
    assertEquals("Permission level incorrect!", 2, manager.getPermissionLevel());
    assertEquals("Phone number incorrect!", "555-555-1234", manager.getPhoneNumber());
    
  }
  
  ParkManager manager = new ParkManager("Frank", "Castle", "FrankCastle@beatudown.org", 
                                        2, "555-555-1234");
  
  
  /**
   * Tests the getter/setter for phone number.
   */
  @Test
  public void testParkManagerPhone() {
    
    manager.setPhoneNumber("555-555-4321");
    
    assertEquals("Phone number didn't set correctly!", "555-555-4321", manager.getPhoneNumber());
    
  }

}
